<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@include("layouts.common.head")
<!-- Fonts -->
    <link href="{{asset('static/css/personal/common.css')}}" rel="stylesheet" type="text/css">
    <link href="{{ asset('static/css/personal/personal_job.css') }}" rel="stylesheet">
    <link href="{{asset('static/css/personal/personal_ajax_dialog.css')}}" rel="stylesheet" type="text/css">

    <!-- Styles -->
    <style>
        html {
            overflow-y: scroll;
        }
    </style>
</head>
<body>
<div id="app">
    @include("layouts.nav")
    @include("home.other_top_nav")
    <div class="us-top">
        <div class="us-main">
            <div class="us-top-box">
                <form id="ajax_search_location"
                      action="" method="get">
                    <div class="input-box"><input type="text" name="key" data-original="请输入关键字" value=""
                                                  placeholder="请输入关键字" autocomplete="off"></div>
                    <div class="se-btn"><input type="submit" value="搜 索"></div>
                    <div class="clear"></div>
                </form>
            </div>
        </div>
    </div>
    <div class="user_main">
        @include('member.layouts.index_left_nav')
        <div class="mainbox">
            <!--职位切换卡 -->
            <div class="tab">
                <a class="li select" href="javascript:;">面试邀请</a>
                <a class="li J_hoverbut" href="{{url("member/apply")}}">已申请职位</a>
                <div class="clear"></div>
            </div>
            <!--切换卡结束 -->


            <div class="resume_tip">

                <div class="tiptit">小提示</div>
                <div class="tiptxt link_blue">
                    招聘过程中企业无权收取任何费用，求职者请加强自我保护，避免上当受骗！
                </div>
            </div>


            <div class="interview_list_th">
                <div class="th1">邀请的职位</div>
                <div class="th2">公司名称</div>
                <div class="th3" style="padding-top: 5px;margin-left: 25px;width: 150px">
                    状态
                </div>
                <div class="th4" style="padding-top: 5px;width:150px">
                    申请时间
                </div>
                <div class="th5">操作</div>
                <div class="clear"></div>
            </div>
            @if($job->first())
                <form id="form1" action="" method="post" class="J_allListBox">

                    @foreach($job as $item)
                        <div class="interview_list J_hoverbut">
                            <div class="td1 link_blue substring">
                                &nbsp;&nbsp;<a target="_blank" href="{{url('job/info',[$item->job_id])}}"
                                               title="">{{$item->jobs_name}}</a>
                            </div>
                            <div class="td2 link_gray6 substring">
                                <p target="_blank"
                                   href="{$vo.company_url}"
                                   title="">{{$item->company_cn}}</a>
                            </div>

                            <div class="td3">

                                @if($item->status == 3)
                                    邀请面试
                                @elseif($item->status == 4)
                                    职位不匹
                                @else
                                    未查看
                                @endif
                            </div>

                            <div class="td4">{{date("Y-m-d",$item->create_time)}}</div>
                            <div class="td5">
                                <a href="javascript:;" class="but1 J_hoverbut J_interviewDetails" did="{{$item->id}}"
                                   title=""></a>
                                <a href="javascript:;" data-url="{{url('/member/interview/del',['id'=>$item->id])}}"
                                   class="but2 J_hoverbut del"></a>
                                <div class="clear"></div>
                            </div>
                            <div class="clear"></div>
                        </div>
                    @endforeach
                    {{--<div class="interview_list_but">--}}
                    {{--<div class="td1"><input name="" class="J_allSelected" type="checkbox" value=""/></div>--}}
                    {{--<div class="td2">--}}
                    {{--<div class="but_blue_80_32 J_hoverbut set_interview">设为已读</div>--}}
                    {{--</div>--}}
                    {{--<div class="td3">--}}
                    {{--<div class="but_gray_80_32 J_hoverbut" id="delall">删除</div>--}}
                    {{--</div>--}}
                    {{--<div class="clear"></div>--}}
                    {{--</div>--}}
                </form>
                <div class="qspage">{{$job->links()}}</div>
            @else
                <div class="res_empty link_blue">
                    目前您暂未收到面试通知，想要获得更多的面试机会，建议你主动投递简历！<br/>海量高薪职位任你选。立即 <a href="{{url('job')}}">投递简历</a>
                </div>
            @endif


        </div>
        <div class="clear"></div>
    </div>
</div>
<!--word简历结束 -->


<div class="clear"></div>
@include('layouts.common.foot')
<script type="text/javascript" src="{{asset('static/js/jquery.modal.dialog.js')}}"></script>
<script type="text/javascript" src="{{asset('static/js/jquery.dropdown.js')}}"></script>
<script type="text/javascript" src="{{asset('static/js/jquery.listitem.js')}}"></script>
<script type="text/javascript" src="{{asset('static/js/jquery.allselected.js')}}"></script>

<script>
    let QS_trade = ["1,消防", "2,安监"];
    let QS_jobtag = ["145,环境好", "146,年终奖", "147,双休", "148,五险一金", "149,加班费", "150,朝九晚五", "151,交通方便", "152,加班补助", "153,包食宿", "154,管理规范", "155,有提成", "156,全勤奖", "157,有年假", "158,专车接送", "159,有补助", "160,晋升快", "161,车贴", "162,房贴", "164,技术培训", "165,旅游"]
    //切换
    $('.J_interviewDetails').click(function () {
        var obj = $(this);
        var id = $(this).attr('did');
        var qsDialog = $(this).dialog({
            title: '面试详情',
            loading: true,
            showFooter: false
        });
        $.getJSON('{{url("/member/interview/info")}}', {id: id}, function (result) {
            obj.closest('.interview_list').find('.td3').removeClass('n');
            obj.closest('.interview_list').find('.td3').text('已查看');
            qsDialog.setContent(result.data.html);
            qsDialog.showFooter(true);

        });
    });
    $('.del').click(function () {
        $.getJSON($(this).data('url'), {}, function (result) {
            if (result.error == 0) {
                disapperTooltip("remind", "成功");
                setTimeout(function () {
                    window.location.reload();
                }, 1000)

            }
        });

    })
</script>
</body>
</html>
